<template>
  <div class="main">
    <!--    :list-query="listQuery"-->
    <data-table
      ref="pagingTable"
      :options="options"
      :list-query="listQuery"
    >
      <template slot="data-columns">

        <el-table-column
          label="笔记内容"
          prop="content"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <router-link :to="{ name: 'UpdateNote', params:{ id: scope.row.id }}">
              {{ scope.row.content }}
            </router-link>
          </template>
        </el-table-column>

        <el-table-column
          label="所属题目"
          prop="quTitle"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <router-link :to="{ name: 'ViewQu', params:{ id: scope.row.quId }}">
              {{ scope.row.quTitle }}
            </router-link>
          </template>
        </el-table-column>

        <el-table-column
          label="修改时间"
          prop="updateTime"
          align="center"
        />
<!--        <el-table-column-->
<!--          label="操作"-->
<!--          align="center"-->
<!--          width="180px"-->
<!--        >-->
<!--          <template slot-scope="scope">-->
<!--            <el-button type="warning" size="mini" icon="el-icon-info" @click="handleQuDetail(scope.row.quId)">题目详情-->
<!--            </el-button>-->
<!--          </template>-->
<!--        </el-table-column>-->

      </template>
    </data-table>
  </div>
</template>
<script>
import DataTable from '@/components/DataTable'

export default {
  name: 'noteList',
  data() {
    return {
      listQuery: {
        current: 1,
        size: 10,
        params: {
          content: "",
          id: "",
          quId: "",
          updateTime: ""
        }
      },

      options: {
        // 可批量操作
        multi: true,
        // 批量操作列表
        multiActions: [
          {
            value: 'delete',
            label: '删除'
          }, {
            value: 'enable',
            label: '启用'
          },
          {
            value: 'disable',
            label: '禁用'
          }
        ],
        listUrl: '/note/paging',
        // 删除请求URL
        deleteUrl: '/note/delete',
        stateUrl: '',
      },
    }
  },
  components: {
    DataTable
  },
  methods: {
    /**
     * 跳转到题目信息页面
     * @param quId 题目ID
     */
    // handleQuDetail(quId) {
    //   this.$router.push({ name: 'ViewQu', params: { id: quId }})
    // }
  }
}
</script>
<style lang="scss" scoped>

</style>
